package im.ok.back.service.impl;

import cn.hutool.core.math.MathUtil;
import im.ok.back.common.ServerResponse;
import im.ok.back.service.INumberService;
import org.springframework.stereotype.Service;

@Service
public class NumberServiceImpl implements INumberService {
    @Override
    public ServerResponse getArrangementCount(int num1, int num2) {
        return ServerResponse.createSuccessData(MathUtil.arrangementCount(num1, num2));
    }

    @Override
    public ServerResponse getCombinationCount(int num1, int num2) {
        return ServerResponse.createSuccessData(MathUtil.combinationCount(num1, num2));
    }
}
